<template>

</template>

<script>
import { getUserInfo } from "@/api/index.js";
import { ElMessage } from "element-plus";
export default {
  name: "Nav",
  data() {
    return {
    };
  },
  mounted() {
    this.userinfo();
  },
  methods: {
    userinfo() {
      var that=this;
      getUserInfo()
        .then(function (res){
          if (res.code == 1) {
            that.menu = res.data.menu;
            // console.log(that.menu);
            ElMessage.error("登陆失败");
            this.$router.push({path: '/order/page1',params:{ id:'1'}});
          }
        })
        .catch(function (error) {});
    },
  },
};
</script>

<style scoped>

</style>
